package com.consumer.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * @author asus
 * @title Minio配置类
 * @description Minio配置类
 * @date: 2022/11/15 23:49
 * @updateTime 2022/11/15 23:49
 */
@Configuration
@ConfigurationProperties(prefix = "minio")
@Data
public class MinioConfig {

    //服务端
    private String endpoint;
    //域名
    private String host;
    //账号
    private String accessKey;
    //密码
    private String secretKey;
    //下载的url
    private String downloadPath;


//    @Bean
//    public MinioClient minioClient() {
//        MinioClient minioClient = MinioClient.builder()
//                .endpoint(endpoint)
//                .credentials(accessKey, secretKey)
//                .build();
//        return minioClient;
//    }


    public String getDownloadURL() {
        return downloadPath;
    }

}
